/**
 * 获取规划编制-》专家评审详情mixins
 */
import {getExpert} from "@/api/make";
import {getfileinfopage} from "@/api/system"
import {getNotNull,dealStartEndDate,getFileTypeFiles} from '@/views/util'
import {REVIEW_DIC} from '@/const/dict'
export default function () {
  return {
    data() {
      return {

      }
    },
    methods: {
      async getDetailData_expert(id) {
        return new Promise((resolve, reject) => {
          getExpert(id).then(async response => {
            var records = response.data.data
            let files = await getFileTypeFiles(records.fileIds)
            let psbgFiles = await getFileTypeFiles(records.reportFileIds)
            let detailData = []
            detailData = [
              {label:'专家组长',value:getNotNull(records.expertLeader)},
              {label:'专家组成员名单',value:getNotNull(records.expertList)},
              {label:'评审时间',value: getNotNull(records.reviewTime)},
              {label:'评审结论',value: getNotNull(records.conclusion)},
              {label:'创建时间',value: getNotNull(records.createTime)},
              {label:'创建人',value: getNotNull(records.createUsername)},
              {label:'评审报告',files: psbgFiles},
              {label:'其他附件',files: files},
            ]
            resolve(detailData)
          })
        })
      },
    }
  }
}
